﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace EvidenceManagement.Logic.Security
{
    public sealed class UndifinedActionsException:Exception
    {
        readonly Type incompatibleType;

        public UndifinedActionsException()
        {

        }

        public UndifinedActionsException(Type moduleType)
        {
            incompatibleType = moduleType;
        }

        public Type IncompatibleType
        {
            get { return incompatibleType; }
        }

        public override string Message
        {
            get
            {
                if (IncompatibleType == null)
                    return base.Message;
                else
                    return string.Format("Incompatible module type. Type of {0} is not SecureModule", incompatibleType.FullName);
            }
        }
    }
}
